package com.liangtian.mdm.dm.common.enums;

import java.util.ArrayList;
import java.util.List;

/**
 * 2016-08-11
 *
 * @author honye
 */
public enum Type {

    QUERY("1", "查询列表"),
    APPLY("2", "申请列表"),
    ADD("add", "新增"),
    EDIT("edit", "编辑"),
    DETAIL("detail", "详情"),
    APPROVE("approve", "审核列表"),
    UPDATE("update", "变更列表"),
    UPDATEHIS("updateHis", "变更历史"),
    UPDATEEDIT("updateEdit", "变更编辑"),
    WH("wh", "维护"),
    IMPORT("batchImport", "批量导入"),
    MAIN("main", "树模板"),
    //VIEWCOLUMN("viewColumn", "显示列做pid"),
    TREE("tree", "树参数");

    private String code;
    private String desc;

    private Type(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static List<String> mdmTypeList = new ArrayList<String>() {
        {
            add(QUERY.getCode());
            add(APPLY.getCode());
            add(ADD.getCode());
            add(EDIT.getCode());
            add(APPROVE.getCode());
            add(UPDATE.getCode());
            add(DETAIL.getCode());
            add(UPDATEHIS.getCode());
            add(UPDATEEDIT.getCode());
            add(IMPORT.getCode());
            add(MAIN.getCode());
        }
    };

    public static List<String> dicTypeList = new ArrayList<String>() {
        {
            add(QUERY.getCode());
            add(APPLY.getCode());
            add(ADD.getCode());
            add(EDIT.getCode());
            add(WH.getCode());
            add(IMPORT.getCode());
            add(MAIN.getCode());
        }
    };

}
